package com.sluggard.security.manage.model.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sluggard.mp.model.req.BaseReq;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
* <p>
    * 用户管理请求体
    * </p>
*
* @author lizheng
* @since 2024-04-28
*/
@Getter
@Setter
@Accessors(chain = true)
@Schema(name = "用户管理请求体", description = "用户管理")
public class UserReq extends BaseReq implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "最后选择角色")
    private Long roleid;

    @Schema(description = "用户名")
    private String username;

    @Schema(description = "姓名")
    private String realname;

    @Schema(description = "昵称")
    private String nickname;

    @Schema(description = "密码")
    private String password;

    @Schema(description = "类型{1:超级管理员,2:普通管理员}")
    private Boolean type;

    @Schema(description = "电子邮件")
    private String email;

    @Schema(description = "手机号码")
    private String mobileNo;

    @Schema(description = "账户过期时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expirationTime;

    @Schema(description = "状态{1:正常,0:停用}")
    private Boolean status;

    @Schema(description = "描述")
    private String descn;

    @Schema(description = "版本号")
    private Integer version;

    @Schema(description = "角色集合")
    private List<Long> roleIds;

}
